package org.alanlau.annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试类
 *
 * @author alan
 * @version 1.0
 * @date 2020/1/12 9:40
 */
public class TestAnnotation {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        AnnotationUser user = context.getBean(AnnotationUser.class);
        System.out.println(user.getBeanMessage());
        System.out.println(user.getBean2Message());
        System.out.println(user.getUserName());
        context.close();
    }
}
